//
//  ACCacheConfiguration.h
//  ACCache_Example
//
//  Created by autohome on 2021/8/10.
//  Copyright © 2021 CaiXiang. All rights reserved.
//

#import <Foundation/Foundation.h>

typedef NS_ENUM(NSUInteger,ACMemoryCachePriority) {
    ACMemoryCachePriorityDefault = 0,
    ACMemoryCachePriorityHigh = 1,
    ACMemoryCachePriorityLow = 2
};

typedef NS_OPTIONS(NSUInteger, ACCachePolicy) {
    ACCachePolicyAll = 1 << 0,
    ACCachePolicyMemory = 1 << 1,
    ACCachePolicyDisk = 1 << 2,
};


NS_ASSUME_NONNULL_BEGIN

@interface ACCacheConfiguration : NSObject

/*!
 @property
 @abstract 默认缓存配置
 */
@property (nonatomic, class, readonly, nonnull) ACCacheConfiguration *defaultCacheConfig;

/*!
 @property
 @abstract 内存缓存的限制数 只在ACCachePolicy 为 ACCachePolicyAll | ACCachePolicyMemory 时有效
 */
@property (assign, nonatomic) NSInteger memoryCountLimit;

/*!
 @property
 @abstract 内存缓存的限制数 只在ACCachePolicy 为 ACCachePolicyAll | ACCachePolicyMemory 时有效
 */
@property (assign, nonatomic) NSInteger memoryCostLimit;

/*!
 @property
 @abstract 缓存的名字
 */
@property (assign, nonatomic) NSString *name;

/*!
 @property
 @abstract 缓存的模式，默认是内存缓存
 */
@property (assign, nonatomic) ACCachePolicy cacheType;

/*!
 @property
 @abstract 缓存有效时长,单位秒
 */
@property (atomic, assign) NSTimeInterval effectiveCacheTime;

@end

NS_ASSUME_NONNULL_END
